Given two numbers A and B. The task is to write a program to find the quotient and remainder of these two numbers when A is divided by B....
Write a function that takes a list sorted in non-decreasing order and deletes any duplicate nodes from the list. The list should only be traversed once. For example if the linked list is 11->11->11->21->43->43->60 then removeDuplicates() should convert the list to 11->21->43->60....
Given a number N(where N <= 50), the task is to find the value of Pi (?) up to N decimals places.Examples:...
Given Preorder, Inorder and Postorder traversals of some tree. The task is to check if they all are of the same tree.Examples:...
Prerequisites: Program for Armstrong Numbers...
Runtime exceptions occur while the program is running. Here, the compilation process will be successful. These errors occur due to segmentation faults and when a number is divided by a division operator or modulo division operator....
Given a number “n”, find its total number of divisors is even or odd....
Given a prime number . The task is to check if it is possible to express as sum of two separate prime numbers.Note: The range of N is less than 108....
Given two positive integers N and K, the task is to construct a simple and connected graph consisting of N vertices with the length of each edge as 1 unit, such that the shortest distance between exactly K pairs of vertices is 2. If it is not possible to construct the graph, then print -1. Otherwise, print the edges of the graph....
Given a string S containing lowercase English characters, the task is to find the frequency of all the characters in the string....
Given two very large floating-point numbers in form of large strings str1 and str2, the task is to add the given two numbers. Example:...
The Spiral/Clockwise Method is a magic tool for C/C++ programmers to define the meaning of syntax declaration in the head within seconds. This method was created by David Anderson and here is a short brief about how to apply this method....